Optical sensing plays an important role in theranostics due to its capability to detect hint biochemical entities or molecular targets as well as to precisely monitor specific fundamental psychological processes. Rare-earth (RE) doped upconversion nanoparticles (UCNPs) are promising for these endeavors due to their unique frequency converting capability; they emit efficient and sharp visible or ultraviolet (UV) luminescence via use of ladder-like energy levels of RE ions when excited at near infrared (NIR) light that are silent to tissues. These features allow not only a high penetration depth in biological tissues but also a high detection sensitivity. Indeed, the energy transfer between UCNPs and biomolecular or chemical indicators provide opportunities for high-sensitive bio- and chemical-sensing. A temperature-sensitive change of the intensity ratio between two close UC bands promises them for use in temperature mapping of a single living cell. In this work, we review recent investigations on using UCNPs for the detection of biomolecules (avidin, ATP, etc.), ions (cyanide, mecury, etc.), small gas molecules (oxygen, carbon dioxide, ammonia, etc.), as well as for in vitro temperature sensing. We also briefly summarize chemical methods in synthesizing UCNPs of high efficiency that are important for the detection limit.