Resource packs are a safe way to achieve the effect without modifying game code. These packs typically adjust light levels or "lightmaps" to ensure everything is rendered at maximum brightness.
Note: This works perfectly for 1.12.2, though sometimes the game resets this value if you change video settings in-game. fullbright for 1.12.2