Image convolution - image darkens
Your image appears darker because standard RGB is used in transformation, with problem inherent to color - grayscale conversion as standard RGB transformation does not preserve luminance.

Simple modification is to switch RGB channels to color space using perceived luminance: $Y = 0.299*R + 0.587*G + 0.114*B$. That way, luminance and chrominance blurring will not result in darkening or artificial color bleeding.

Color spaces like Y'UV or RGB are non-linear, so make sure to use linear one, say sRGB or any perception-aware/ linear space.

If you can trade speed with accuracy, floating-point box filters are visually better. Given 5x5 blur is tempting, but does not approximate Gaussian Blur accurately enough.

Something is wrong with your code.
Images appears darker by bad color space, but not that much. I took python code found here as it is, and took your image, the result is darker in my opinion, but not visible to the point of shadow dark. 

I haven't seen your picture while writing answer but, it seems to me that divisor used is bigger than the sum of cell values.