In-universe, it could refer to it being adjacent to the Muggle world.
It exists parallel to Muggle London, in a skewed sort of reality. It doesn't get in the way or attract the notice of Muggles in London. However, the entrance to it is in London, and it is very close to the Muggle world. It would have to be enchanted to exist in a place that is oblique to the Muggle world, which could be how it got its name. Also, the location of it could be hidden in such a way that it is actually literally diagonal to London.
There also may be no in-universe reason. It could simply be a street name to the people living there, and only be intended as a pun out-of-universe.
Out-of-universe, yes, it's almost definitely a pun.
I don't think Rowling has ever confirmed that the name Diagon Alley is a play on the word diagonally, but it almost certainly is. Its dark counterpart is Knockturn Alley, a play on the word nocturnally. Another example of a place named after a pun is the Black family home, Number 12 Grimmauld Place, which is meant to sound like "grim old place". It would be an amazing coincidence for the names to accidentally form such suitable puns in each of these cases, so it would be fairly logical to presume the wordplay is intentional.
In addition, Rowling has used a lot of puns and wordplay throughout the Harry Potter series. It's so extensive that she would be unable to confirm every single case of it, and it's likely that anyone who noticed the Diagon Alley pun would have presumed it was intended, and not considered asking Rowling about it specifically.