If the deck is visible from underneath that is the first place to check. Rust, flakes, soft spots, sagging, discoloration all point to deck problems. The other way to check is through test cuts. Take a 2′ x 2′ test cut and examine the deck. Some deck issues like rust will not show up from the bottom until too late. Examining the deck from above takes some experience. Metal decks should be inspected for rust and poked with some gusto to make sure the metal is solid. Wood decks should be poked also to make sure they are solid. Concrete decks are trickier. Some concrete decks utilize lightweight concrete or gypsum to provide the slope in roof. Some roof decks are completely lightweight concrete or gypsum. There are some very strange combinations of materials on some older buildings. Once in a while ponding on a roof can point to deck problems (usually the problem lies within the roofing system).
If there are major deck problems the entire roof should be removed and the deck issues addressed. If there is a small area with problems it may be cost effective to only remove the roofing in that area, replace or repair the decking, then install new roofing material to the height of the adjacent roof area. If the condition of the deck is suspect and the new roofing system you choose utilizes mechanical fasteners (or adhesive directly on the deck) to secure either the insulation or waterproofing layer a pull test should be done. This involves screwing a fastener into the deck and utilizing equipment that measures the force (lbs.) required as it pulls the fastener straight out of the deck. The roofing manufacturer of your intended system should be able to perform the test and tell you what length warranty is available based on the test. The same principal applies to a pull test with adhesive. A pull test is especially important for metal roof go overs. The pull test also may help decide the fastening pattern required to meet certain wind uplift scenarios.