Cubesats are small satellites that are inexpensive to build and launch due to their small, standardized form factor. While many early cubesats were passively stable and were tasked with relatively simple missions, some cubesat missions developed recently have more ambitious mission objectives that involve pointing to many different targets. These may include the Sun, to collect solar power; a groundstation, to transmit data; and targets of scientific interest. This thesis is concerned with identifying an optimum sequence of these targets to view in order to maximize a success metric for scientific missions: The amount of data transmitted to Earth over the mission horizon. While this problem can be solved by a variety of strategies including optimal control approaches, integer methods, and formal methods, here we focus on a graph-based formulation of the optimization problem and a formulation that involves Signal Temporal Logic (STL). In the graph-based approach, we design optimal attitude guidance (i.e. desired attitudes at fixed points in time) that maximizes the data volume transmitted to the ground over the time horizon while ensuring onboard battery level remains above a threshold. This technique involves modeling the onboard processes of energy transfer in the battery and the handling of onboard data. A finite set of desirable attitudes spanning the mission horizon is identified, and a mathematical graph is formed describing the allowable transitions between these desirable attitudes. Then, we discretely propagate the battery level and data storage states through paths in this graph to identify the optimal attitude trajectory. In the STL-based strategy, we instead use the continuous-time dynamics of the satellite and its onboard systems to design optimal control torques that meet an STL specification on the satellite's behavior. This specification is designed to mandate that the battery remain nonempty at all time and to force the satellite to orient itself so that groundstations may be contacted. Feasible control inputs for this specification are designed using a gradient-based optimization over the STL robustness degree, a metric quantifying the degree to which the specification is satisfied. We apply both the graph-based and STL-based methods to two cubesat missions motivating this work: EXACT and IMPRESS. Both cubesats share a similar bus and x-ray detector payload, but EXACT's mission is to point its detector at the Crab Nebula pulsar, whereas IMPRESS's mission requires its detector to point towards the Sun. Both satellites are also equipped with antennas for communication with terrestrial groundstations as well as solar panels for charging their batteries. These missions give rise to a rich set of tradeoffs: Pointing a detector at the scientific target increases valuable data onboard, but also requires energy of a finite battery. The optimization strategies presented here offer a means to design attitude sequences for these missions in an intelligent way. We present simulation results for our optimization strategies applied to both missions, demonstrating the value of these methods.