In my shed, there are two 2×4 diagonal braces attached across the studs (highlighted in red on a picture). I want to install shelves along those walls, so want to remove those 2x4s. Can I safely do that or should I reinforce studs somehow first?


Use steel strapping , it is so thin that you can put shelving over it. I would use more than two where the 2 X 4 are ; put in a few. Parallel the existing braces and at 90 degrees to the existing braces. Get it as tight as possible. Looks like there is already some galvanized bracing. The steel banding I used was bluish and had many holes , convenient for screws.
Those diagonal braces appear to be temporary bracing in order to get the roof and siding installed for two reasons: 1) different length braces, and 2) lack of double nailing at each stud.
If the diagonal bracing was structural, they’d be installed uniformly, including the length of the braces.
It’s difficult to see in the picture, but some places where the braces cross over the studs they are NOT nailed. In fact, if the braces were structural, you’d double nail at each stud.
You can remove the diagonal braces.
I’d be more concerned about keeping the side with the large opening square.