An electronic device (101, 220, 620, 700, 820) mountable on a wearable device (510, 610, 810), wherein the wearable device is a head-mounted device including lenses provided at positions corresponding to eyes of a user and light-receiving elements, wherein the light receiving elements are at a known position relative to one or more of the lenses, the electronic device comprising: a display unit comprising a plurality of pixels; a memory; and at least one processor operatively coupled to the memory, configured, when the electronic device is mounted on the wearable device, to: control the display unit to display a screen including a predetermined pattern by using one or more pixels from among the plurality of pixels of the display unit; receive a signal that is transmitted from the wearable device in response to displaying the screen, wherein the signal includes information indicating light sensed by one or more light-receiving elements among the light-receiving elements; determine one or more respective positions of the one or more light-receiving elements relative to the electronic device based on the signal indicating light sensed by the one or more light-receiving elements and based on a position of the one or more pixels emitting the light from among the plurality of pixels when displaying the predetermined pattern; identify left and right screen display areas for displaying content on the display unit based on the determined one or more respective positions of the one or more light-receiving elements relative to the electronic device; and control the display unit to display content on the identified left and right screen display areas such that the displayed content is viewable through the lenses. a display unit comprising a plurality of pixels; a memory; and at least one processor operatively coupled to the memory, configured, when the electronic device is mounted on the wearable device, to: control the display unit to display a screen including a predetermined pattern by using one or more pixels from among the plurality of pixels of the display unit; receive a signal that is transmitted from the wearable device in response to displaying the screen, wherein the signal includes information indicating light sensed by one or more light-receiving elements among the light-receiving elements; determine one or more respective positions of the one or more light-receiving elements relative to the electronic device based on the signal indicating light sensed by the one or more light-receiving elements and based on a position of the one or more pixels emitting the light from among the plurality of pixels when displaying the predetermined pattern; identify left and right screen display areas for displaying content on the display unit based on the determined one or more respective positions of the one or more light-receiving elements relative to the electronic device; and control the display unit to display content on the identified left and right screen display areas such that the displayed content is viewable through the lenses. control the display unit to display a screen including a predetermined pattern by using one or more pixels from among the plurality of pixels of the display unit; receive a signal that is transmitted from the wearable device in response to displaying the screen, wherein the signal includes information indicating light sensed by one or more light-receiving elements among the light-receiving elements; determine one or more respective positions of the one or more light-receiving elements relative to the electronic device based on the signal indicating light sensed by the one or more light-receiving elements and based on a position of the one or more pixels emitting the light from among the plurality of pixels when displaying the predetermined pattern; identify left and right screen display areas for displaying content on the display unit based on the determined one or more respective positions of the one or more light-receiving elements relative to the electronic device; and control the display unit to display content on the identified left and right screen display areas such that the displayed content is viewable through the lenses.