We introduce a cryostat setup for measuring fundamental optical and electrical properties of light-emitting diodes (LEDs). With the setup, the cryostat pressure and the LED properties of the forward voltage, junction temperature, and electroluminescence spectrum are monitored with temperature steps less than 1.5 K, over the junction temperature range of 81-297 K. We applied the setup to commercial yellow AlGaInP and blue InGaN LEDs. At cryogenic temperatures, the fine structure of the electroluminescence spectra became resolved. For the yellow LED, we observed the phonon replica at 2.094 eV that was located 87 meV below the peak energy at the junction temperature of 81 K. For the blue LED, we observed the cascade phonon replicas at 2.599 eV, 2.510 eV, and 2.422 eV with the energy interval of 89 meV. For both LED types, the forward voltage increased sharply toward the lower temperatures due to the increased resistivity of materials in the LED components. We found significant differences between the temperature dependent behaviors of the forward voltages, spectral peak energies, and bandgap energies of LEDs obtained from the Varshni formula. We also noted a sharp pressure peak at 180-185 K arising from the solid-vapor phase transition of water when the base level of the cryostat pressure was approximately 0.4 mPa.