An electronic device comprising: at least one light emitter; a light receiver; a digitizer formed at a periphery of the at least one light emitter and the light receiver, the digitizer being configured to detect location information comprising a touch coordinate; and a processor operably connected to the at least one light emitter and the light receiver, wherein the processor is configured to: emit light outside of the electronic device through the at least one light emitter, obtain, through the light receiver, light reflected by an external object among the emitted light, obtain a signal generated based on at least a portion of the reflected light and corresponding to the external object through the digitizer and receive the detected location information from the digitizer, output guide information related to a location of the external object when the signal satisfies a first designated condition, and obtain biometric information about the external object when the signal satisfies a second designated condition, wherein the light receiver comprises a plurality of photodiodes, and the light receiver is configured with at least one of a form in which the photodiodes are integrated, a form in which the photodiodes are disposed parallel to a predetermined direction, or a form in which the photodiodes are disposed at each of an upper portion, left side portion, lower portion, and right side portion based on a central hole of the light receiver. at least one light emitter; a light receiver; a digitizer formed at a periphery of the at least one light emitter and the light receiver, the digitizer being configured to detect location information comprising a touch coordinate; and a processor operably connected to the at least one light emitter and the light receiver, wherein the processor is configured to: emit light outside of the electronic device through the at least one light emitter, obtain, through the light receiver, light reflected by an external object among the emitted light, obtain a signal generated based on at least a portion of the reflected light and corresponding to the external object through the digitizer and receive the detected location information from the digitizer, output guide information related to a location of the external object when the signal satisfies a first designated condition, and obtain biometric information about the external object when the signal satisfies a second designated condition, emit light outside of the electronic device through the at least one light emitter, obtain, through the light receiver, light reflected by an external object among the emitted light, obtain a signal generated based on at least a portion of the reflected light and corresponding to the external object through the digitizer and receive the detected location information from the digitizer, output guide information related to a location of the external object when the signal satisfies a first designated condition, and obtain biometric information about the external object when the signal satisfies a second designated condition, wherein the light receiver comprises a plurality of photodiodes, and the light receiver is configured with at least one of a form in which the photodiodes are integrated, a form in which the photodiodes are disposed parallel to a predetermined direction, or a form in which the photodiodes are disposed at each of an upper portion, left side portion, lower portion, and right side portion based on a central hole of the light receiver.