How does OpenGL rasterize pixels?

I drew a pixel with color (0.5, 0.5, 0)at window location (357.2, 255.5) and then use glReadPixels() to read the pixel values from the following four locaitons, they are with their respective colors:
(357, 255), (0.36, 0.36, 0)
(358, 255), (0.255, 0.255, 0)
(357, 256), (0.36, 0.36, 0)
(358, 256), (0.255, 0.255, 0)

How does OpenGL rasterize to result in those color values?

Are you using MSAA

Yes. But if I do not use it, I only get (0.49, 0.49, 0) at (357, 256). All the other locations are 0;

That sounds about right. The .49 will just be rounding errors - this makes interesting reading

http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

With MSAA only some samples of the fragment at set - at (358, 255), (0.255, 0.255, 0) about half the fragment is covered. So this results in the screen pixel value.

What samples are set depends on the driver, the graphics card and the anti-aliasing chosen (MSAA, CSAA, FXAA - probably others)