Is y=3 a function?

Yes. The equation $y = 3$ represents the function that maps all $x$ values to $3$.
The equation $y = 3$ represents a horizontal line, which will have exactly one intersection point with any vertical line. So it passes the vertical line test for a function too.